#!/bin/bash

REPO_PATH="/www/wwwroot/fastapp"
echo $REPO_PATH
cd $REPO_PATH || exit
if git fetch && git diff 'origin/master'; then
    git pull
    ps -ef | grep -v grep | grep fastapp | awk '{print $2}'|xargs kill -9
    rm -rf runtime/container
    nohup ./swoole-cli bin/hyperf.php start >/dev/null 2>&1 &
fi